Beyond Relooper: recursive translation of unstructured control flow to structured control flow (functional pearl)

نویسندگان

چکیده

In many compilers, control flow is represented using an arbitrary directed graph. But in some interesting target languages, including JavaScript and WebAssembly, intraprocedural can be expressed only structured ways, loops, conditionals, multilevel breaks or exits. As was shown by Peterson, Kasami, Tokura 1973, such obtained translating flow. The translation uses two standard analyses, but as published, it takes three passes—which may explain why overlooked Emscripten, a popular compiler from C to JavaScript. By tweaking the analyses applying fundamental ideas functional programming (recursive functions immutable abstract-syntax trees), translation, along with couple of code improvements, implemented single pass. This new implementation slated added Glasgow Haskell Compiler. Its single-pass its representation, use dominator trees make much easier reason about than original translation.

برای دانلود باید عضویت طلایی داشته باشید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Classification of Malware Using Structured Control Flow

Malware is a pervasive problem in distributed computer and network systems. Identification of malware variants provides great benefit in early detection. Control flow has been proposed as a characteristic that can be identified across variants, resulting in flowgraph based malware classification. Static analysis is widely used for the classification but can be ineffective if malware undergoes a...

متن کامل

Taming Control Flow: A Structured Approach to Eliminating Goto Statements

1994 IEEE. Personal use of this material is permitted. However, permission to reprint/republish this material for advertising or promotional purposes or for creating new collective works for resale or redistribution to servers or lists, or to reuse any copyrighted component of this work in other works must be obtained from the IEEE. Abstract In designing optimizing and parallelizing compilers, ...

متن کامل

Characterization and Transformation of Unstructured Control Flow in GPU Applications

Hardware and compiler techniques for mapping data-parallel programs with divergent control flow to SIMD architectures have recently enabled the emergence of new GPGPU programming models such as CUDA and OpenCL. Although this technology is widely used, commodity GPUs use different schemes to implement it, and the performance limitations of these different schemes under real workloads are not wel...

متن کامل

Modeling Programs with Unstructured Control Flow for Debugging

Even with modern software development methodologies, the actual debugging of source code, i.e., location and identification of errors in the program when errant behavior is encountered during testing, remains a crucial part of software development. To apply model-based diagnosis techniques, which have long been state of the art in hardware diagnosis, for automatic debugging, a model of a given ...

متن کامل

Control of Nozzle Flow Using Microjets at Supersonic Mach Regime

This article reports the active control of base flows using the experimental procedure. Active control of base pressure helps in reducing the base drag in aerodynamic devices having suddenly expanded flows. Active control in the form of microjets having 0.5 mm radius placed at forty-five degrees apart is employed to control the base pressure. The Mach numbers of the present analysis are 1.7, 2....

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

ژورنال

عنوان ژورنال: Proceedings of the ACM on programming languages

سال: 2022

ISSN: ['2475-1421']

DOI: https://doi.org/10.1145/3547621